class CreateUserIcons < ActiveRecord::Migration
  def self.up
  	create_table (:user_icons, :options=>'ENGINE=InnoDB DEFAULT CHARSET=utf8',:force => true) do |t|
  		t.integer		:user_id, :null	=> false
  		t.integer		:crop_x, 	:default => 0
  		t.integer		:crop_y, 	:default => 0
  		t.integer		:crop_w, 	:default => 0
  		t.integer		:crop_h, 	:default => 0
  		t.string 		:pic_file_name, :limit => 200
  		t.string		:tmp_pic_file_name, :limit => 200
  		t.integer		:status, :default => 0, :limit => 1
  		t.integer		:flag, :default => 0, :limit => 4
  	end
  end

  def self.down
  	drop_table		:user_icons
  end
end
